<script type="module" src="./run.js"></script>

<textarea id="source" style="width: 100%;height: 400px;">
let x;
x = 1;
function a() {
  log(x);
}
{
  let x;
  x = 2;
  a();
}
</textarea>

<button id="run" onclick="">run</button>